package com.example.dianproject.repository;

import com.example.dianproject.entity.SysUser;
import com.example.dianproject.entity.UserRole;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface SysUserRepository extends JpaRepository<SysUser, Long> {
    Optional<SysUser> findByUsername(String username);
    Optional<SysUser> findByUsernameAndRole(String username, UserRole role);
    boolean existsByUsername(String username);
} 